package com.smart.manager.system.entities.models;


import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.system.entities.enums.TaskRunMode;
import com.smart.manager.system.entities.enums.TaskRunResult;
import com.smart.manager.system.entities.views.TaskView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

/**
 * @author Administrator
 * 定时任务应用程序
 */

@EqualsAndHashCode(callSuper = true)
@Data @Entity @Accessors(chain = true)
public class SystemScheduleRecord extends BaseLongModel {



    /**
     * 任务
     */
    @ManyToOne
    @ApiModelProperty("关联任务")
    @JoinColumn(name = "task",referencedColumnName = "id")
    private TaskView task;

    /**
     * 运行模式
     */
    @ApiModelProperty("运行模式")
    private TaskRunMode runMode;

    /**
     * 运行时间
     */
    @ApiModelProperty("运行时间")
    private LocalDateTime runTime;
    /**
     * 运行结果
     */
    @ApiModelProperty("运行结果")
    private TaskRunResult runResult;
    /**
     * 消息
     */
    @ApiModelProperty("描述信息")
    private String message;



}
